package org.ns.longhttp.example;

import org.ns.longhttp.entity.DataEntry;
import org.ns.longhttp.pull.LongLoopClient;
import org.ns.longhttp.pull.PackageResponse;
import org.ns.longhttp.pull.ResponseCallback;

public class LoopDemo {
    public static void main(String[] args){
        LongLoopClient client = new LongLoopClient();

        client.loop("http://152.136.204.218:11111/test", null, new ResponseCallback() {
            @Override
            public void callback(PackageResponse response) {
                for (DataEntry datum : response.getData()) {
                    System.out.println(datum.contentString());
                }
            }
        });

    }
}
